#ifndef _UART_DEAL_H
#define _UART_DEAL_H	
#include "include.h"
#define UART_TX_DATA_LENGTH                    32
#define UART_RX_DATA_LENGTH                    32

#define uart_head1_ID                          0x4B
#define uart_head2_ID                          0x58
#define uart_versions_ID                       0x5A
struct Uart_Struct { 
	 uchar sFormat_ucData[UART_RX_DATA_LENGTH];
	 uchar rx_data[UART_RX_DATA_LENGTH]; 
	 uchar tx_data[UART_TX_DATA_LENGTH]; 	 
	 uchar rx_data_length,RX_Num_CNT,rx_ok_b; 
	 uchar rx_time;
	 uchar checksum;
	 uchar power_versions;
	 uchar communication_cnt;
	 uchar communication_err;

	 uchar sent_flag;
	 ulong sent_time_cnt;
	 uchar En_Sent_Flag,Sent_Flag,Sent_Num,Sent_Cnt;
	 uchar delay_get_data_cnt; 
}; 
MC_EXT struct  Uart_Struct uart_struct; 

void Power_Uart_Init(void);
void Uart_Senddata(uchar *pString,uchar num);
void Uart_SendOneByte(uchar ch);
void Deal_Uart_Power_Data(void);
void Power_Data_Send(void);	 
void enter_check_mode(void);
void exit_check_mode(void);
#endif

